package com.sunday.aomi.ui.order;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sunday.common.base.BaseActivity;
import com.sunday.aomi.R;
import com.sunday.member.entity.addr.Address;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by 刘涛 on 2017/5/30.
 */

public class PaySuccessActivity extends BaseActivity {


    @Bind(R.id.title)
    TextView title;
    @Bind(R.id.left_txt)
    TextView leftTxt;
    @Bind(R.id.right_menu)
    ImageView rightMenu;
    @Bind(R.id.right_txt)
    TextView rightTxt;
    @Bind(R.id.left_menu)
    ImageView leftMenu;
    @Bind(R.id.total_layout)
    RelativeLayout totalLayout;
    @Bind(R.id.total_money)
    TextView totalMoney;
    @Bind(R.id.user_name)
    TextView userName;
    @Bind(R.id.user_addr)
    TextView userAddr;
    @Bind(R.id.btn_check)
    TextView btnCheck;

    private String total_Money;
    private Address address;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay_success);
        ButterKnife.bind(this);
       title.setText("提交成功");
        total_Money=getIntent().getStringExtra("totalMoney");
        address= (Address) getIntent().getSerializableExtra("address");
        totalMoney.setText("订单金额："+total_Money);
        userName.setText("收货人："+address.getReceiveName()+"  "+address.getReceiveMobile());
        userAddr.setText("收货地址："+address.getProvinceName()+
                address.getCityName()+address.getDistrictName()+address.getReceiveAddress());

    }

    @OnClick(R.id.btn_check)
    void checkOrder(){
        intent=new Intent(mContext,BuyOrderListActivity.class);
        startActivity(intent);
        finish();
    }
}
